import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class MyConllection {

    public static void main(String[] args) {
        int nums[] = {1, 2, 3};
        //arr流  升级  收集
        Stream<Integer> stream = Arrays.stream(nums).boxed();
        //filter
        List<Integer> collect2 = stream.filter(a -> a > 2).collect(Collectors.toList());
        System.out.println(collect2);
        List<Integer> list = Arrays.stream(nums).boxed().collect(Collectors.toList());
        System.out.println(list);
    }


}
